<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<aside class="bg-dark lter aside-md hidden-print" id="nav">
    <section class="vbox">
        <header class="header bg-primary lter text-center clearfix">
            <div class="btn-group">
                <h4>角色：<%=session.getAttribute("roleName")%>
                </h4>
            </div>
        </header>

        <section class="w-f scrollable">
            <div class="slim-scroll" data-height="auto" data-disable-fade-out="true" data-distance="0" data-size="5px"
                 data-color="#333333"> <!-- nav -->
                <nav class="nav-primary hidden-xs">
                    <ul class="nav">
                       <%-- <li>
                            <a href="${basePath}/user/index">
                                <i class="fa fa-columns icon">
                                    <b class="bg-danger"></b>
                                </i>
                                <span>个人信息</span>
                            </a>
                        </li>--%>
                        <%int roleId = (int) session.getAttribute("roleId");%>
                        <c:if test="<%=roleId == 1%>">
                            <li>
                                <a href="#layout">
                                    <i class="fa fa-user icon">
                                        <b class="bg-warning"></b>
                                    </i>
                                    <span class="pull-right">
                                    <i class="fa fa-angle-down text"></i>
                                    <i class="fa fa-angle-up text-active"></i>
                                </span>
                                    <span>用户管理</span>
                                </a>
                                <ul class="nav lt">
                                    <li>
                                        <a href="${basePath}/user/userLists">
                                            <i class="fa fa-angle-right"></i>
                                            <span>用户列表</span>
                                        </a>
                                    </li>
                                    <li>
                                        <a href="${basePath}/user/adduser">
                                            <i class="fa fa-angle-right"></i>
                                            <span>添加用户</span>
                                        </a>
                                    </li>
                                </ul>
                            </li>
                            <li>
                                <a href="#pages">
                                    <i class="fa fa-table icon">
                                        <b class="bg-primary"></b>
                                    </i>
                                    <span class="pull-right">
                                    <i class="fa fa-angle-down text"></i>
                                    <i class="fa fa-angle-up text-active"></i>
                                </span>
                                    <span>试题管理</span>
                                </a>
                                <ul class="nav lt">
                                    <li>
                                        <a href="${basePath}/question/questionLists">
                                            <i class="fa fa-angle-right"></i>
                                            <span>试题管理</span>
                                        </a>
                                    </li>
                                    <%--<li>
                                        <a href="#">
                                            <i class="fa fa-angle-right"></i>
                                            <span>试题预览</span>
                                        </a>
                                    </li>--%>
                                    <li>
                                        <a href="${basePath}/exampaperController/uploadView">
                                            <i class="fa fa-angle-right"></i>
                                            <span>试卷上传</span>
                                        </a>
                                    </li>
                                    <li>
                                        <a href="${basePath}/exampaperController/downloadView">
                                            <i class="fa fa-angle-right"></i>
                                            <span>试卷下载</span>
                                        </a>
                                    </li>
                                </ul>
                            </li>
                            <li>
                                <a href="${basePath}/grade/gradeLists">
                                    <i class="fa fa-file-text icon">
                                        <b class="bg-danger"></b>
                                    </i>
                                    <span>查看成绩</span>
                                </a>
                            </li>
                           <%-- <li>
                                <a href="#">
                                    <i class="fa fa-columns icon">
                                        <b class="bg-danger"></b>
                                    </i>
                                    <span>数据备份</span>
                                </a>
                            </li>--%>
                        </c:if>
                        <c:if test="<%=roleId == 2%>">
                            <li>
                                <a href="${basePath}/grade/teacherGradeView">
                                    <i class="fa fa-file-text icon">
                                        <b class="bg-danger"></b>
                                    </i>
                                    <span>试题判分</span>
                                </a>
                            </li>
                            <li>
                                <a href="#pages">
                                    <i class="fa fa-table icon">
                                        <b class="bg-primary"></b>
                                    </i>
                                    <span class="pull-right">
                                    <i class="fa fa-angle-down text"></i>
                                    <i class="fa fa-angle-up text-active"></i>
                                </span>
                                    <span>试题管理</span>
                                </a>
                                <ul class="nav lt">
                                    <li>
                                        <a href="${basePath}/question/addQuestion">
                                            <i class="fa fa-angle-right"></i>
                                            <span>试题添加</span>
                                        </a>
                                    </li>
                                    <li>
                                        <a href="${basePath}/question/questionLists">
                                            <i class="fa fa-angle-right"></i>
                                            <span>试题预览</span>
                                        </a>
                                    </li>
                                    <li>
                                        <a href="${basePath}/exampaperController/uploadView">
                                            <i class="fa fa-angle-right"></i>
                                            <span>试卷上传</span>
                                        </a>
                                    </li>
                                    <li>
                                        <a href="${basePath}/exampaperController/downloadView">
                                            <i class="fa fa-angle-right"></i>
                                            <span>试卷下载</span>
                                        </a>
                                    </li>
                                </ul>
                            </li>
                            <li>
                                <a href="${basePath}/question/paperStrategies">
                                    <i class="fa fa-file-text icon">
                                        <b class="bg-danger"></b>
                                    </i>
                                    <span>组卷策略</span>
                                </a>
                            </li>
                            <li>
                                <a href="${basePath}/grade/gradeLists">
                                    <i class="fa fa-file-text icon">
                                        <b class="bg-danger"></b>
                                    </i>
                                    <span>查看成绩</span>
                                </a>
                            </li>
                        </c:if>
                        <c:if test="<%=roleId == 3%>">
                            <li>
                                <a href="${basePath}/exampaperController/downloadView">
                                    <i class="fa fa-file-text icon">
                                        <b class="bg-info"></b>
                                    </i>
                                    <span>试卷下载</span>
                                </a>
                            </li>
                            <li>
                                <a href="#pages">
                                    <i class="fa fa-pencil icon">
                                        <b class="bg-primary"></b>
                                    </i>
                                    <span class="pull-right">
                                    <i class="fa fa-angle-down text"></i>
                                    <i class="fa fa-angle-up text-active"></i>
                                </span>
                                    <span>学生考试</span>
                                </a>
                                <ul class="nav lt">
                                    <li>
                                        <a href="${basePath}/studentExamController/studentExamView">
                                            <i class="fa fa-angle-right"></i>
                                            <span>开始考试</span>
                                        </a>
                                    </li>
                                    <li>
                                        <a href="${basePath}/studentExamController/gradeStatisticView">
                                            <i class="fa fa-angle-right"></i>
                                            <span>成绩统计</span>
                                        </a>
                                    </li>
                                </ul>
                            </li>
                        </c:if>
                    </ul>
                </nav>
                <!-- / nav --> </div>
        </section>
    </section>
    <footer class="footer lt hidden-xs b-t b-light">
        <a href="#nav" data-toggle="class:nav-xs" class="pull-right btn btn-sm btn-default btn-icon"> <i
                class="fa fa-angle-left text"></i> <i class="fa fa-angle-right text-active"></i> </a>
    </footer>
</aside>

<script>
    $(function () {
        var url = location.href;
        $("nav li > a[href='" + url + "']").parents("li").attr("class", "active");
        $(".slimScrollDiv,.slim-scroll").height("auto");
    })
</script>
<script>
    $(function () {
        $(".boxMain,.hbox").height($(window).height() - 100);
    })
</script>